package com.g2.admin.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.g2.admin.common.constant.StatusTypeEnums;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 单位信息表
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_org")
public class UserOrgPo implements Serializable {
    private static final long serialVersionUID = -597187905898879400L;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "创建人ID")
    private Long creater;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "父单位ID")
    private Long parentId;
    @ApiModelProperty(value = "父单位名称")
    private String parentName;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "状态：1、正常；2、禁用；9、删除")
    private StatusTypeEnums.StatusEnums status;
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    @ApiModelProperty(value = "更新人ID")
    private Long updater;

    @TableField(exist = false)
    private List<UserOrgPo> children;
}